<template>
  <div>
    <NavBar />
    <nav-bar title="尚云科技" @lalalala="changeLaLa" @dididi="handleDiDiDi" />

    <el-button type="primary" :loading="true">主要按钮</el-button>
    <button>按钮</button>
    <el-button type="warning" icon="el-icon-star-off" circle @click="test"></el-button>
    <el-table
        :data="tableData"
        style="width: 100%">
      <el-table-column
          prop="date"
          label="日期"
          width="180">
      </el-table-column>
      <el-table-column
          prop="name"
          label="姓名"
          width="180">
      </el-table-column>
      <el-table-column
          prop="address"
          label="地址">
      </el-table-column>
    </el-table>
  </div>
</template>
<script>

import NavBar from "@/components/NavBar.vue";

export default {
  name: "ElementTest",
  components: {NavBar},
  data() {
    return {
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  },
  methods: {
    test() {
      // alert(123)
      this.$alert('这是一段内容', '标题名称', {
        confirmButtonText: '确定',
        callback: action => {
          this.$message({
            type: 'info',
            message: `action: ${action}`
          });
        }
      });
    },
    changeLaLa(params) {
      console.log("我是父组件，我收到了你传递的changelalala是事件，接收到了你的信息")
      console.log(params)
    },
    handleDiDiDi(params){
      console.log(params)
    }
  }
}
</script>


<style scoped>

</style>
